<template>
  <div>
    <!-- 标题 -->
    <h4>{{goodsInfo.title}}</h4>
    <hr>
    <div class="content" v-html="goodsInfo.content"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // 详情
      goodsInfo: {}
    }
  },
  created() {
    this.getGoodsDesc()
  },
  methods: {
    // 获取详情
    async getGoodsDesc () {
      const { data: res } = await this.$axios.get(`/api/goods/getdesc/${this.$route.params.id}`)
      if (res.status !== 0) return false
      this.goodsInfo = res.message[0]
    }
  }
}
</script>

<style lang="less" scoped>
h4{
  font-size: 16px;
  color: #226aff;
  text-align: center;
}
.content{
  margin-bottom: 50px;
}
</style>
